<h2>

  <?=$titulo?>

  <?php if (in_array('C', $crud)): ?>

  <a href="<?=$url?>/novo">Novo</a>

  <?php endif ?>

</h2>



<form method="post" class="filtro" action="<?=$url ; ?>/listar">

  <fieldset>

    <legend>Filtro de busca</legend>

    <?=$form?>

  <input type="submit" value="Procurar" class="submit" />

  </fieldset>

</form>



<table width="100%" class="filtro">

  <thead>

    <tr>

      <?foreach($campos as $campo):?>

        <th><?=$model->fields[$campo]['label']?></th>

      <?endforeach?>

        <th>&nbsp;</th>

    </tr>

  </thead>

  <tbody>

    <? foreach($itens as $row):?>

    <tr>

      <?foreach($campos as $campo):?>

        <td class="<?=url_title($campo) ; ?>"><?=$row->{$campo}?></td>

      <?endforeach?>

      <td class="acoes">

        <?php if (in_array('U', $crud)): ?>

          <a  class="editar" href="<?=$url?>/editar/<?=$row->{$model->id_col}?>" title="Editar este registro">Editar</a>

        <?php endif ?>

        <?php if (in_array('D', $crud)): ?>

          <a class="excluir" href="<?=$url?>/deletar/<?=$row->{$model->id_col}?>" title="Deletar este registro" class="detetar_registro">Excluir</a>

        <?php endif ?>

        

        <?php foreach($acoes_extras as $acao_extra): ?>
        

          <a href="<?=site_url($acao_extra['url']."/".$row->{$model->id_col});?>" title="<?=$acao_extra['title'];?>" class="<?=$acao_extra['class'];?>"><?=$acao_extra['title'];?></a>

        <?php endforeach;?>

      </td>

    </tr>

    <? endforeach?>

  </tbody>

</table>



<?=$paginacao ?>

